

<form id="edit-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">

 
    <div class="form-group">
        <label for="c-url" class="control-label col-xs-12 col-sm-2">{:__('模版分类')}:</label>
        <div class="col-xs-12 col-sm-8">
			<select id="c-flag" class="form-control "  name="row[type]" style="height:31px;">
				<option value="1"   {if $row.type == '1'}selected{/if}>通用模版</option>
				<option value="2"   {if $row.type == '2'}selected{/if}>关键词模版</option>
			</select>
		</div>
    </div>
    <div class="form-group form-input form-input-title">
		<label class="control-label col-xs-12 col-sm-2">标题：</label>
		<div class="col-xs-12 col-sm-8">
			<input id="c-name" data-rule="required" class="form-control form-control" placeholder="请输入标题" name="row[template_title]" type="text" value="{$row.template_title}">
		</div>
	</div>
    <div class="form-group form-input form-input-title">
		<label class="control-label col-xs-12 col-sm-2">选择类目：</label>
		<div class="col-xs-12 col-sm-8">
            <select id="c-flag" class="form-control "  name="row[category_id]" style="height:31px;">
				<option value=""  >模版分类为类目模版时需选择</option>
                {foreach name="category_list" id="vo" }
                <option value="{$vo.id}"  {if $row.category_id == $vo.id}selected{/if}>{$vo.name}({$vo.chil_name})</option>
                {/foreach}
			</select>
		</div>
	</div>
    <div class="form-group titel">
        <label for="username" class="control-label col-xs-12 col-sm-2">模版标题:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control " rows="8" name="row[title]"
                                cols="50"  placeholder="">{$row.title}</textarea>
        </div>
    </div>
    <div class="form-group form-input form-input-title">
		<label class="control-label col-xs-12 col-sm-2">模版内容：</label>
		<div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control " rows="16" name="row[text]"
            cols="50" placeholder="">{$row.text}</textarea>
		</div>
	</div>

    {foreach name="variate" id="vo" }
    <div class="form-group form-input form-input-title">
		<label class="control-label col-xs-12 col-sm-2">变量名：</label>
		<div class="col-xs-12 col-sm-2">
			<input class="form-control form-control" placeholder="请输入变量名" name="row[variate_name][]" type="text" value="{$vo.variate_name}">
		</div>
        <label class="control-label col-xs-12 col-sm-1">变量值：</label>
		<div class="col-xs-12 col-sm-6">
			<input class="form-control form-control" placeholder="请输入对应变量值" name="row[variate_value][]" type="text" value="{$vo.variate_value}">
		</div>
	</div>
    {/foreach}
   
    <div class="form-group hide layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>

